﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Camping_Project_WEB.Models.ReservationModels>" %>



<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Espace réservation
</asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <script src="../../Scripts/jquery-1.6.4.js" type="text/javascript"></script>

    <script src="../../Scripts/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>

    <script type="text/javascript" src="../../Scripts/ui.datepicker-fr.js" ></script>

    <script type="text/javascript">

    $.datepicker.setDefaults($.datepicker.regional['fr']);
        $(function () {

            $("#datepicker").datepicker({ dateFormat: 'dd/mm/yy' });

        });

        $(function () {

            $("#datepicker2").datepicker({ dateFormat: 'dd/mm/yy' });

        });

        $(function () {

            $("#datepicker3").datepicker({ dateFormat: 'dd/mm/yy' });

        });
 
    </script>


    <h2>Reservation d'un séjour dans notre camping</h2>
    <h3>Si vous n'etes pas sur de votre date de départ définitive, vous pouvez utiliser une date approximative (qui sera de max 3 jours d'intervalle a votre date définitive)</h3>
    <h3>Remarque : une réservation comprend d'office deux adultes</h3>

    <% using (Html.BeginForm()) {%>

    
    

    <%List<SelectListItem> listeNbPersonne = new List<SelectListItem>();

                            listeNbPersonne.Add(new SelectListItem  
                            {  
                                Text = "0",  
                                Value = "0"  
                            });
                            listeNbPersonne.Add(new SelectListItem  
                            {  
                                Text = "1",  
                                Value = "1"  
                            });
                            listeNbPersonne.Add(new SelectListItem
                            {
                                Text = "2",
                                Value = "2"
                            });
                            listeNbPersonne.Add(new SelectListItem
                            {
                                Text = "3",
                                Value = "3"
                            });
                            listeNbPersonne.Add(new SelectListItem
                            {
                                Text = "4",
                                Value = "4"
                            });
                            listeNbPersonne.Add(new SelectListItem
                            {
                                Text = "5",
                                Value = "5"
                            });
                            listeNbPersonne.Add(new SelectListItem
                            {
                                Text = "6",
                                Value = "6"
                            });
                            listeNbPersonne.Add(new SelectListItem
                            {
                                Text = "7",
                                Value = "7"
                            });
                            listeNbPersonne.Add(new SelectListItem
                            {
                                Text = "8",
                                Value = "8"
                            });
                            listeNbPersonne.Add(new SelectListItem
                            {
                                Text = "9",
                                Value = "9"
                            });

                            listeNbPersonne.Add(new SelectListItem
                            {
                                Text = "10",
                                Value = "10"
                            });
           
             %>

  
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Informations nécessaires a la réservation</legend>

            <table border="1">

                <tr>
                    <th></th>
                    <th>Dates</th>
                    <th>Choix</th>
                </tr>
            
                <tr>
                    
                    <td> <%: Html.LabelFor(model => model.dateDebut) %></td>
                    <td><%: Html.TextBoxFor(model => model.dateDebut, new { id = "datepicker" })%></td>
                    <td></td>
                    <td><%: Html.ValidationMessageFor(model => model.dateDebut) %></td>
                    

                </tr>


                <tr>
                    <td><%: Html.LabelFor(model => model.dateFinApprox) %></td>
                    <td><%: Html.TextBoxFor(model => model.dateFinApprox,new { id = "datepicker2" }) %></td>
                    <td><%: Html.CheckBoxFor(model => model.booldateApprox) %></td>
                    <td><%: Html.ValidationMessageFor(model => model.dateFinApprox) %></td>

                </tr>
                      
                      
                <tr>
                    <td><%: Html.LabelFor(model => model.dateFinDef) %></td>
                    <td><%: Html.TextBoxFor(model => model.dateFinDef,new { id = "datepicker3" }) %></td>
                    <td><%: Html.CheckBoxFor(model => model.booldateDef) %></td>
                    <td><%: Html.ValidationMessageFor(model => model.dateFinDef) %></td>
                   
                </tr>
                                     

            </table>
            
            <br />

             <table border="1">

                <tr>
                    <th><%: Html.LabelFor(model => model.tente) %></th>
                    <th><%: Html.LabelFor(model => model.caravane) %></th>
                </tr>

                <tr>
                    <td><%: Html.CheckBoxFor(model => model.tente) %></td>
                    <td><%: Html.CheckBoxFor(model => model.caravane) %></td>
                
                </tr>
             </table>
            
            <div class="editor-label">
              <%: Html.ValidationMessageFor(model => model.tente) %>
              <%: Html.ValidationMessageFor(model => model.caravane) %>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.nbAdultes) %>
            </div>
            <div class="editor-field">

                <%: Html.DropDownListFor(model => model.nbAdultes, listeNbPersonne) %>
                <%: Html.ValidationMessageFor(model => model.nbAdultes) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.nbEnfants) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.nbEnfants,listeNbPersonne) %>
                <%: Html.ValidationMessageFor(model => model.nbEnfants) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.nbAnimaux) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.nbAnimaux,listeNbPersonne) %>
                <%: Html.ValidationMessageFor(model => model.nbAnimaux) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.nbVehicules) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.nbVehicules,listeNbPersonne) %>
                <%: Html.ValidationMessageFor(model => model.nbVehicules) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.electricite) %>
            </div>
            <div class="editor-field">
                <%: Html.CheckBoxFor(model => model.electricite) %>
                <%: Html.ValidationMessageFor(model => model.electricite) %>
            </div>
            
            
            <p>
                <input type="submit" value="Reserver" />
            </p>

          

        </fieldset>



    <% } %>

</asp:Content>